package org.mango.action;

import org.mango.base.BaseAction;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * Created by meigang on 17/9/8.
 */
@Controller
@RequestMapping("/show")
public class ReactShowAction extends BaseAction{

    @GetMapping("/**")
    public String index(HttpServletRequest request) throws IOException {
        String uri = request.getRequestURI();
        uri = uri.replaceAll(this.getCtx()+"/show","");
        uri = "/react"+uri;
        this.setAttr("ctx",this.getCtx());
        this.setAttr("appurl",uri);
        return "show";
    }



}
